package com.config;

import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * @author: cxt
 * @time: 2021/11/25
 * 在SpringBoot启动之后执行代码
 */
@Component
public class CommandLineRunnerImpl implements CommandLineRunner {
    /*
     * 另一种是实现ApplicationRunner接口
     */
    @Override
    public void run(String... args) throws Exception {
        System.out.println("SpringBoot启动成功之后执行相关代码……");
    }
}
